package com.jsh.erp.service;


import com.baomidou.mybatisplus.extension.service.IService;

import com.jsh.erp.datasource.entities.SysRole;


import com.jsh.common.api.vo.Result;
import org.jeecgframework.poi.excel.entity.ImportParams;
import org.springframework.web.multipart.MultipartFile;

import java.util.List;

/**
 * <p>
 * 角色表 服务类
 * </p>
 *
 * @Author scott
 * @since 2018-12-19
 */
public interface ISysRoleService extends IService<SysRole> {

    /**
     * 导入 excel ，检查 roleCode 的唯一性
     *
     * @param file
     * @param params
     * @return
     * @throws Exception
     */
    Result importExcelCheckRoleCode(MultipartFile file, ImportParams params) throws Exception;

    /**
     * 删除角色
     * @param roleid
     * @return
     */
    public boolean deleteRole(String roleid);

    /**
     * 批量删除角色
     * @param roleids
     * @return
     */
    public boolean deleteBatchRole(String[] roleids);

    SysRole findRolebyId(String selectedRoles);

    SysRole findRolebyUserId(String id);

    List<SysRole> getRolesIdAndName();

    Integer checkIsNameExist(Integer id, String name);
}
